import os
import random
import time
from time import sleep
import requests
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
from base.base_page import BasePage, BoxDriver
from selenium.webdriver.common.by import By
from login_page import LoginPage


class TTPage(LoginPage):

    # 设置投放位置----> 优选广告位
    def toutiao_add1(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')


        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')


        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 广告投放位置——————————————————————————————————————————————————————————————————> 优选广告位
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 设定投放位置————> 按媒体指定位置
    def toutiao_add2(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')


        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')


        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 广告投放位置——————————————————————————————————————————————————————————————————> 按媒体指定位置
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[2]')

        app_name = random.randint(1,3)

        if app_name == 1:
            driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[3]/div/div[1]/div[2]/table/tbody/tr[1]/td[1]/div/label/span/input')

        elif app_name == 2:
            driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[3]/div/div[1]/div[2]/table/tbody/tr[1]/td[1]/div/label/span/input')
            driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[3]/div/div[1]/div[2]/table/tbody/tr[4]/td[1]/div/label/span/input')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 素材选择大图横图
    def toutiao_add3(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')


        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')


        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # ————————————————————————————————————————————————————————————————————————————>大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 素材选择横版视频
    def toutiao_add4(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')


        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')


        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # ----------------------------------------------------------------------------->横版视频
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[2]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div/div/div[2]/div/div[1]/label/div/div/div')

        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[44]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        # 推广卡片选择已保存
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/form/div/div[1]/div/div/div/div/div[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/form/div/div[2]/div[2]/div/div[1]/div/i')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/form/div/div[2]/div[2]/div[1]/div[2]/ul[2]/li')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[7]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))
                         #(//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[7]/div/div[1]/input)

        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[16]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[16]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[18]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 广告计划关系————一对一
    def toutiao_add5(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系=======================================================================>一对一

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 广告计划关系----一对多
    def toutiao_add6(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系=======================================================================>一对多

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[2]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 创建计划方式——--同步创建
    def toutiao_add7(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式=========================================================================>同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 创建计划方式----分别创建
    def toutiao_add8(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式===================================================================>分别创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[2]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 广告组选择-----创建广告组-----按营销场景投放
    def toutiao_add9(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组===================================================================>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 广告组选择-----创建广告组-----按推广目的投放
    def toutiao_add10(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组===================================================================>按推广目的投放——————>销售线索收集
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div[1]/div[1]/div/div/div/div/div[3]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div[1]/div[2]/div[2]/div[3]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div[2]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)


        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[15]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[19]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[13]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[13]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[13]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[13]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div[1]/div')
        sleep(2)


        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 广告组选择-----选择已有广告组
    def toutiao_add11(self,imgs):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 广告组======================================================================>选择已有广告组
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[3]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[2]/div[1]/div[3]/div/div[1]/p')


        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)


        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[15]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[19]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[46]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[13]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[13]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[13]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[13]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div[1]/div')
        sleep(2)


        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 广告计划下-----使用搜索快投关键字
    def toutiao_add12(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")
        # 点击下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 搜索快投关键词=============================================================================>启用

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[3]/div/div[1]/label[2]')
        # 点击更改
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[3]/div/div[2]/div/span[3]')
        # 点击手动添加关键词
        driver.click('xpath,/html/body/div[5]/div[2]/div/div/div[2]/div[1]/div[1]/button/span')
        # 输入关键词
        sleep(2)
        driver.input('xpath,/html/body/div[47]/div[2]/div/div/div/div/div[1]/div/textarea','陈奕迅')
        # 点击确定
        driver.click('xpath,/html/body/div[47]/div[2]/div/div/div/div/div[2]/button[2]')
        # 点击右下角确定
        driver.click('xpath,/html/body/div[5]/div[2]/div/div/div[2]/div[2]/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 附加创意转化组件----不启用
    def toutiao_add13(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)


        # 不启用==========================================================================> 创意转化组件

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 创意转化组件----预约按钮
    def toutiao_add14(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)


        # 预约按钮==========================================================================> 创意转化组件

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[10]/div/div/label[3]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/div[1]/button')
        driver.input('xpath,/html/body/div[48]/div[2]/div/div/div[2]/form/div[1]/div/div[1]/input','海棠花未眠')
        driver.input('xpath,/html/body/div[48]/div[2]/div/div/div[2]/form/div[2]/div/div/input','多面体星球')
        driver.click('xpath,/html/body/div[48]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div/p')
        driver.click('xpath,/html/body/div[47]/div[2]/div/div/div[2]/div[2]/div[1]/div/label[2]')
        driver.click('xpath,/html/body/div[47]/div[2]/div/div/div[3]/div/button[2]')
        driver.click('xpath,/html/body/div[48]/div[2]/div/div/div[2]/form/div[3]/div/div/div[2]/div/p')
        driver.click('xpath,/html/body/div[47]/div[2]/div/div/div[2]/div[2]/div[1]/div/label[2]')
        driver.click('xpath,/html/body/div[47]/div[2]/div/div/div[3]/div/button[2]')
        driver.click('xpath,/html/body/div[48]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[3]/div/p')
        driver.click('xpath,/html/body/div[47]/div[2]/div/div/div[2]/div[2]/div[1]/div/label[2]')
        driver.click('xpath,/html/body/div[47]/div[2]/div/div/div[3]/div/button[2]')
        driver.click('xpath,/html/body/div[48]/div[2]/div/div/div[3]/div/button[2]')


        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[13]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[18]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[22]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 竞价策略-----优先跑量
    def toutiao_add15(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)


        # 竞价策略======================================================================>优先跑量


        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 竞价策略-----均衡投放
    def toutiao_add16(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)


        # 竞价策略======================================================================>均衡投放
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[16]/div/div/label[2]')


        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 竞价策略-----控制成本上限
    def toutiao_add17(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)


        # 竞价策略======================================================================>控制成本上限
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[16]/div/div/label[3]')


        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 投放时间------从今天起长期投放
    def toutiao_add18(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)


        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 投放时间======================================================================>从今天起长期投放


        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 投放时间-----设置开始和结束日期
    def toutiao_add19(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)


        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 投放时间======================================================================>设置开始和结束日期
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[18]/div/div/label[2]')


        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 定向包选择----自定义定向包
    def toutiao_add20(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)


        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)


        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)
        # 定向包==========================================================================>自定义定向

        # 地域------按省市------全选
        driver.click('xpath,//*[@id="tabsimple"]/div[2]/div[1]/form/div[1]/div/div[1]/label[2]')
        driver.click('xpath,//*[@id="tabsimple"]/div[2]/div[1]/form/div[1]/div/div[2]/div[1]/div/div[2]/label/span[1]/input')
        sleep(1)

        # 自定义人群
        driver.click('xpath,//*[@id="tabsimple"]/div[2]/div[1]/form/div[4]/div/div/label[2]')
        # 定向池
        driver.click('xpath,//*[@id="tabsimple"]/div[2]/div[1]/form/div[5]/div/div/div[3]/div[1]/div[1]/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="tabsimple"]/div[2]/div[1]/form/div[5]/div/div/div[3]/div[1]/div[2]/div/div[2]/label[3]/span/input')
        sleep(2)
        # 排除池
        driver.click('xpath,//*[@id="tabsimple"]/div[2]/div[1]/form/div[5]/div/div/div[2]/div[1]/div[1]/div/div[1]/div/div/div/div/div[3]')
        driver.click('xpath,//*[@id="tabsimple"]/div[2]/div[1]/form/div[5]/div/div/div[2]/div[1]/div[2]/div/div[2]/label[1]/span/input')
        sleep(2)
        # 手机价格-----自定义
        driver.click('xpath,//*[@id="tabsimple"]/div[2]/div[1]/form/div[15]/div/div[1]/label[2]')

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 定向包选择----使用定向包    先不调用 有bug
    def toutiao_add21(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        #定向包===========================================================================>使用定向包
        driver.click('xpath,//*[@id="tabsimple"]/div[1]/div/div/div/div/div[3]')

        driver.click('xpath,')

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 智能放量----不启用
    def toutiao_add22(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        #智能放量========================================================================>不启用

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 定向包-----手机价格----自定义
    def toutiao_add23(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)

        # 微优选广告位
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横图
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        # 手机价格========================================================================>自定义
        driver.click('xpath,//*[@id="tabsimple"]/div[2]/div[1]/form/div[14]/div/div[1]/label[2]')


        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 创意标题-----选择单个文案
    def toutiao_add24(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        #文案================================================================================>选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 创意标题-----批量选择文案
    def toutiao_add25(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        #文案================================================================================>批量选择文案

        # 点击批量选择文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[1]/div/p')
        sleep(1)
        driver.click('xpath,/html/body/div[40]/div/div/div/div[2]/div[1]/div[1]/div/div[2]/label[4]/span/input')
        driver.click('xpath,/html/body/div[40]/div/div/div/div[2]/div[1]/div[1]/div/div[2]/label[8]/span/input')
        ele2 = driver.locate_element('xpath,/html/body/div[40]/div/div/div/div[2]/div[2]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele2)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 搭配试玩----不启用
    def toutiao_add26(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        # 选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))

        # 搭配试玩=============================================================================>不启用

        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 搭配试玩----启用
    def toutiao_add27(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        # 选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 搭配试玩=============================================================================>启用
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[7]/div/div/label[2]')


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[16]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[16]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[18]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 自动生成视频素材----不启用
    def toutiao_add28(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        # 选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))

        # 自动生成视频素材=================================================================>不启用


        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 自动生成视频素材----启用
    def toutiao_add29(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        # 选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))

        # 自动生成视频素材===================================================================>启用
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[8]/div/div/label[2]')

        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 最优创意衍生计划----不启用
    def toutiao_add30(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        # 选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))

        # 最优创意衍生计划=============================================================================>不启用

        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 最优创意衍生计划----启用
    def toutiao_add31(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        # 选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))

        # 最优创意衍生计划========================================================================>启用

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[9]/div/div/label[2]')

        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 广告评论----关闭
    def toutiao_add32(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        # 选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))

        # 广告评论==================================================================================>关闭

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[10]/div/div/label[1]')

        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 广告评论----开启
    def toutiao_add33(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        # 选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 广告评论============================================================================>开启

        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 创意展现----优选模式
    def toutiao_add34(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[3]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[7]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        # 选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[42]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))


        # 创意展现=============================================================================>优选模式

        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[10]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)


    # 创意展现----轮播模式
    def toutiao_add35(self,imgs,ad_name):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')


        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击今日头条广告管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[1]/div')

        # 点击创建投放任务
        el = driver.locate_element('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[1]/div[1]/div/button/span')
        driver.execute_scripts("arguments[0].click()", el)

        sleep(2)

        # 媒体登录账户选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[1]/div/span')

        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[1]/div/div/div[2]/ul[2]/li')

        # 管家/代理商
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[1]/div/span')
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[2]/div/div/div[2]/ul/div[2]/div[1]/li/div/p')

        # 广告主选择
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div/div[1]/div')
        sleep(2)
        driver.input('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[1]/input','上海爆量科技有限公司-双生1')
        sleep(5)
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[2]/form/div[3]/div/div[1]/div[2]/ul/div[2]/div[1]/li/div/p')
        # 点击下一步
        driver.click('xpath,/html/body/div[4]/div[2]/div/div/div[3]/div/button[2]')


        sleep(3)
        # 微优选广告位

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[2]/div/div/div[1]/label[1]')

        sleep(2)
        # 大图横版
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[5]/label[3]')
        sleep(2)
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[1]/div[8]/div/div[1]/div/div[3]/div/div[1]/label/div/div/div')


        # 广告计划关系————一对一
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[1]/div/div/label[1]')

        # 创建计划方式—————同步创建
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/form[2]/div[2]/div/div/label[1]')

        sleep(1)


        driver.execute_script("document.body.style.zoom='0.25'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告素材截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())


        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/button[2]')
        sleep(3)

        # 创建广告组—————>按营销场景投放——————>预约
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[1]/div/div/div/div/div[2]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[1]/div/div/div/div/div[2]/div[1]/div[2]/div')

        # 广告组名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[1]/div[2]/div[1]/div/form/div[4]/div/div[1]/input',ad_name)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.45'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告组截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[2]/div[2]/div/button[2]')

        sleep(3)
        # 落地页链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[8]/div/div[1]/div/input','https://www.chengzijianzhan.com/tetris/page/6874805994322345991')
        sleep(1)

        # 预约下载链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[9]/div/div/input','https://itunes.apple.com/cn/app/id1506722057')
        sleep(1)

        # 转化目标
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[11]/div/button/span')
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[8]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)

        # 应用包名
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[12]/div/div/input','com.bilibili.gcg2.bili')
        sleep(1)

        # 预算
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[17]/div/div/div/input',random.randint(300,1000))
        sleep(1)

        # 目标转化出价
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[1]/div[21]/div/div/div/input',random.randint(1,100))
        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        #driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告计划截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 选择定向
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 计划名称
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/form[2]/div[2]/div[2]/div/div[2]/div/div/input',random.randint(11223344,66778899))

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")


        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[3]/div/button[2]')
        sleep(3)

        # 创意标题
        # 选择单个文案
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[2]/span')
        driver.click('xpath,//*[@id="title"]/label[2]')
        ele1 = driver.locate_element('xpath,/html/body/div[43]/div/div/div/div[2]/div[3]/button[2]')
        driver.execute_scripts("arguments[0].click()", ele1)

        #driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[2]/div[2]/div/div[2]/div[2]/div/div[1]/div[1]/div/input','你的文案')

        sleep(2)
        # 来源
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[6]/div/div[1]/input',random.choice(['百里','虞姬','司空震','盖聂','卫庄','扶苏']))

        # 创意展现=====================================================================>轮播模式
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[11]/div/div/label[2]')

        # 创意分类
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[1]/div[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/ul/li[1]')
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[14]/div/div/div/div[2]/div/span/span/span/ul/li[1]')
        sleep(2)

        # 创意标签
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/input',random.choice(['今天','明天','昨天','未来','以前','后来']))
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[15]/div/div/div[1]/div')
        sleep(2)

        # 监测链接
        driver.input('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/form/div[17]/div/div/input','https://line3-adscore-api.biligame.net/v2/api/click/toutiao?cid=__CID__&cid_name=__CID_NAME__')
        sleep(2)

        driver.execute_script("document.body.style.zoom='0.33'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\广告创意截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 下一步
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div/div[4]/div[2]/button[2]')
        sleep(3)

        sleep(1)

        driver.execute_script("document.body.style.zoom='0.4'")
        sleep(3)
        # driver.get_screenshort_as_file(r'C:\codes\UIAuto\screen\test01\提交用例截图.png')
        # 截图保存到测试报告里
        imgs.append(driver.add_img())

        sleep(1)
        # 恢复原有大小
        driver.execute_script("document.body.style.zoom='1'")

        # 提交
        handles = driver.handles()
        driver.switch_to_window(handles[-1])
        sleep(3)
        driver.click('xpath,/html/body/div[11]/div[2]/div/div/div[3]/div/button[2]')

        sleep(1)




    # 获取广告组的名字，之后进行断言
    def adver_group_name(self):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')

        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击投放任务管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[3]/div')

        # 今日头条下拉框
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[1]/div[1]/div[1]/div/i')
        sleep(2)

        # 选择今日头条
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[1]/div[1]/div[2]/ul[2]/li[1]')
        return driver.locate_elements('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div[1]/div/div[1]/div[2]/table/tbody/tr[1]/td[2]/div/span')[-1].text




    def task_id(self):
        driver = self.driver

        # 点击瑶光
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[1]/div[1]/div[3]/span')

        # 游戏选择下拉列表
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[1]/div/span')
        driver.input('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[1]/input',' 享游SDK-测试-哔哩Android ')
        driver.click('xpath,//*[@id="app"]/div/div[1]/div/div[1]/div/div[3]/div/div[2]/ul/div[2]/li/div/p')

        # 点击投放任务管理
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[1]/div[1]/ul/li[3]/div')

        # 今日头条下拉框
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[1]/div[1]/div[1]/div/i')
        sleep(2)

        # 选择今日头条
        driver.click('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[1]/div[1]/div[2]/ul[2]/li[1]')
        return driver.locate_elements('xpath,//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[2]/div[1]/div/div[1]/div[2]/table/tbody/tr[1]/td[1]/div/span')[-1].text




    def delivery_task_ad(self):
        base_url = 'http://uat-ad-serving-web-sh.bilibili.co/api/delivery_tasks?task_id='
        url = base_url + str(self.task_id())
        header = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36',
            'Cookie': '_AJSESSIONID=fd6053633c2030b19547a9fc68b86760; username=v_chenguangde'
        }
        r = requests.get(url, headers=header)
        result = r.json()
        ad_state = result['data']['ad_info_list'][0]['ad_state']
        return ad_state



    def delivery_task_campaign(self):
        base_url = 'http://uat-ad-serving-web-sh.bilibili.co/api/delivery_tasks?task_id='
        url = base_url + str(self.task_id())
        header = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36',
            'Cookie': '_AJSESSIONID=fd6053633c2030b19547a9fc68b86760; username=v_chenguangde'
        }
        r = requests.get(url, headers=header)
        result = r.json()
        campaign_state = result['data']['ad_info_list'][0]['campaign_state']
        return campaign_state



if __name__ == '__main__':
    imgs = []
    ad_name = ''
    driver = BoxDriver(imgs)
    add = TTPage(driver)
    add.login()
    add.toutiao_add1(imgs, ad_name)
    add.toutiao_add2(imgs, ad_name)
    add.toutiao_add3(imgs, ad_name)
    add.toutiao_add4(imgs, ad_name)
    add.toutiao_add5(imgs, ad_name)
    add.toutiao_add6(imgs, ad_name)
    add.toutiao_add7(imgs, ad_name)
    add.toutiao_add8(imgs, ad_name)
    add.toutiao_add9(imgs, ad_name)
    add.toutiao_add10(imgs, ad_name)

    add.toutiao_add11(imgs)

    add.toutiao_add12(imgs, ad_name)
    add.toutiao_add13(imgs, ad_name)
    add.toutiao_add14(imgs, ad_name)
    add.toutiao_add15(imgs, ad_name)
    add.toutiao_add16(imgs, ad_name)
    add.toutiao_add17(imgs, ad_name)
    add.toutiao_add18(imgs, ad_name)
    add.toutiao_add19(imgs, ad_name)
    add.toutiao_add20(imgs, ad_name)
    add.toutiao_add21(imgs, ad_name)
    add.toutiao_add22(imgs, ad_name)
    add.toutiao_add23(imgs, ad_name)
    add.toutiao_add24(imgs, ad_name)
    add.toutiao_add25(imgs, ad_name)
    add.toutiao_add26(imgs, ad_name)
    add.toutiao_add27(imgs, ad_name)
    add.toutiao_add28(imgs, ad_name)
    add.toutiao_add29(imgs, ad_name)
    add.toutiao_add30(imgs, ad_name)
    add.toutiao_add31(imgs, ad_name)
    add.toutiao_add32(imgs, ad_name)
    add.toutiao_add33(imgs, ad_name)
    add.toutiao_add34(imgs, ad_name)
    add.toutiao_add35(imgs, ad_name)





